/*****************************************************
* ---佛祖保佑-永不宕机-永无BUG---
*　　功能           LuBan类型映射工具类

*　　作者　　　　　　Strong
*　　时间　　　　　　2025.06.26
*******************************************************/

using System.Collections.Generic;
using UnityEngine;

namespace Configs
{
    public static class LuBanTypeMapper
    {
        #region VectorXMapper

        public static Vector2 NewVector2(TM.Vector2 v2) => new(v2.X, v2.Y);
        public static Vector2 NewVector2Int(TM.Vector2Int v2) => new Vector2Int(v2.X, v2.Y);
        public static Vector3 NewVector3(TM.Vector3 v3) => new(v3.X, v3.Y, v3.Z);
        public static Vector3 NewVector3Int(TM.Vector3Int v3) => new Vector3Int(v3.X, v3.Y, v3.Z);
        public static Vector4 NewVector4(TM.Vector4 v4) => new Vector4(v4.X, v4.Y, v4.Z, v4.W);

        #endregion

        #region KeyValuePair

        public static KeyValuePair<int, int> NewKeyValuePair(TM.KeyValuePair kvp) => KeyValuePair.Create(kvp.Key, kvp.Value);
        public static KeyValuePair<int, float> NewKeyValuePairIntFloat(TM.KeyValuePairIF kvp) => KeyValuePair.Create(kvp.Key, kvp.Value);
        public static KeyValuePair<string, int> NewKeyValuePairStrInt(TM.KeyValuePairSI kvp) => KeyValuePair.Create(kvp.Key, kvp.Value);
        public static KeyValuePair<string, float> NewKeyValuePairStrFloat(TM.KeyValuePairSF kvp) => KeyValuePair.Create(kvp.Key, kvp.Value);

        #endregion
    }
}